#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>



#define TIMER_CMD_ON _IO('L',3)
#define TIMER_CMD_OFF _IO('L',4)
#define TIMER_CMD_SET _IOW('L',5,int)



int main(int argc,char *argv[]){
   
    int fd;

    unsigned int ret = 0;
    fd = open("/dev/test_dev",O_RDWR);
    if(fd < 0){
        perror("open error \n");
        return fd;
    }
    int val = 1000;
   
        ioctl(fd,TIMER_CMD_ON);

        
 
        sleep(3);
        ioctl(fd,TIMER_CMD_SET,val);
         sleep(3);       
        ioctl(fd,TIMER_CMD_OFF);
    close(fd);

    return 0;



}